#!/bin/bash
#
#Author: Yuanfang Xia,
#Github: https://github.com/jamesxia4
#mailto:johnnyrxia4@126.com
#
#What can this script do?
#    Setup a new Ubuntu system capable of doing machine learning and computer vision
#    project via python, with mysql support and WebDev capabilities.
#
#This script installs the following software on your system:
#    vim with shengxc's vimrc ( https://github.com/shengxc
#    python,python3,pip
#    git,
#    numpy,scipy,matplotlib,
#    mysql,django
#
#Test Environment:
#    HP Compaq 8000 USDT, Intel Core Quad Q6600, 2*2GB=4GB RAM, 500GB 7200RPM 2.5' HDD
#    @2014-12-23


echo "Version 2014-12-23, tested in Ubuntu 14.04 Kylin， AMD64 Version"

#Install several package
sudo apt-get -y install python python3 git python-numpy python-scipy
sudo apt-get -y install python-pip python-dev build-essential

#Set git username and email
git config --global user.name "jamesxia4"
git config --global user.email "johnnyrxia4@126.com"

#Download Firefox and flash player
#TODO: copy other flash player resource
sudo apt-get -y install firefox
cp ./libflashplayer.so /usr/lib/mozilla/plugins/ -rf
chmod 755 /usr/lib/mozilla/plugins/libflashplayer.so


#Download OpenCV
#Version 2014-11-11, 3.0 BETA for Linux/Mac
mkdir /home/yuanfang/software_bak
wget https://codeload.github.com/Itseez/opencv/zip/3.0.0-beta
cd /home/yuanfang/software_bak
mkdir ./opencv
cp opencv-3.0.0-beta.zip ./opencv
unzip ./opencv-3.0.0-beta.zip

